Dynomotion

Group: DynoMotion Message: 10772 From: yanvrno@frontier.com Date: 1/4/2015
Subject: How to control Dual Spindles Speeds?
I have two separate Servo Drives used for two Spindles, How can I create a script to control each Spindle speed independent of each other? Can I send a separate variable that is not seen as a S word? Both are used as a spindle or a positioning device.

I have the code written to swap the control (rotary position or Spin) but changing the S word at this point is passed to both drives.    (using m3 and m103 or m4 and m104)

Thinking maybe I have to check both flags (message and speed) to see where its being called from. Then again not sure how to pass the two different speeds to two separate flags.

Think sitting on my rear, getting away from it and posting this, I have some new ideas to try. But any help would be great.

Thanks
Mac

BTW: did like the G0 speed control during the program moves but was surprised it did not act like it worked in the jogging mode. 433k


Group: DynoMotion Message: 10774 From: Tom Kerekes Date: 1/5/2015
Subject: Re: How to control Dual Spindles Speeds?
Hi Mac,

I'm not sure I fully understand, but one suggestion might be to set a Virtual Bit to indicate and keep track of which Spindle is currently active.  Then the C Programs associated with M3, M5, S and so forth could test that Bit to determine which Spindle is ccurrently active and which to control.

Regards
TK

Group: DynoMotion Message: 10777 From: yanvrno@frontier.com Date: 1/5/2015
Subject: Re: How to control Dual Spindles Speeds?
I like them both to be active and independent but the S word is passed to both, One is the lathe spindle and the other is a 4th axis milling head. Not sure when Id ever use it but I did try to mill an undercut on a part as the spindle was turning. I just had to settle on both of them running at the same speed.

What do you consider currently active, Spinning or the mcode being called for that device? If I understand you, I would set a vbit in the script that sets my mill spindle to rotate. the m103 or m104 but not sure how to pass just the speed to that device only. as the S word is global. Can I send it a different word that the  gcode would except? and then parse out that variable in the script? Is there a way to fill a User variable in the gcode then the script can see and use? what about a #666=2200  and then use that in the mcode script as a speed variable? but where or can I find these pound variables in the source code script variables?

hope that makes sense as it is confusing, lol

Thanks
Mac
Group: DynoMotion Message: 10781 From: Tom Kerekes Date: 1/5/2015
Subject: Re: How to control Dual Spindles Speeds?
Hi Mac,

I'm still in favor of the idea of selecting the "active" spindle with M codes.  The "active" Spindle would be the one that any M3,M4,M5,S commands apply to.  For example you might make M100 select Spindle A and M101 select Spindle B by having these M codes set or Clear a virtual bit (ie 48).

So then in G Code you might have:

M100 (select spindle A)
M3S1000 (turn Spindle A on and set to 1000 RPM)

M101 (select spindle B)
M3S2000 (turn Spindle B on and set to 2000 RPM)

(now Spindle A is operating at 1000RPM and Spindle B is operating at 2000RPM)

M100 (change Spindle A to 1500RPM)
S1500

(now Spindle A is operating at 1500RPM and Spindle B is still operating at 2000RPM)

M100
M5
M101
M5

(Both Spindles now stopped).

The C Programs will need to first test the Virtual bit to see which spindle they should perform operations on.


A different approach might be to use M Codes with Parameters.  See:


HTH
Regards
TK





Group: DynoMotion Message: 10791 From: yanvrno@frontier.com Date: 1/7/2015
Subject: Re: How to control Dual Spindles Speeds?
Cool... that works well Thanks

Just took some time getting my head wrapped around the setting and resetting of the flags, and separating out the two spindles to their own program. But then having one common program to control the overrides. But it works sweet now.

I have to use a M100 for spindle orientation any chance you will be adding a M19 to your list? I thought to be using a m119 for the mill spindle orientation. As one of the plans is to have tangential control.

Also tried adding a M105 as the mill spindle stop but KmotionCNC just removed it from the option list so I had to settle on M102, (might be a slight bug).

still tryng to figure out these messages as 3 and 13 for the two buttons and 4 and 14 then 5 and 15 then when i added mine I get 20 and 103 I assume its the button number association. and if no button it uses the mcode number.

Noticed that the flyout help messages hint to what Fkey to use but if I change the button function the help still shows the default setting.

One last question how can I reset the feed overide, has to be a source code name and  value I can use to reset it back to 1. Forgot id moved it and could not for the life of me figure out why my threads were off by 42% LOL. Or we need a overide on feeds when a threading cycle is called. Like the ability to control feeds and rapids with the sliders but the thread cycle should be independent.

I am loving DynoMotion and the turning capabilities that are becoming more available.

Thanks again.
Mac
Group: DynoMotion Message: 10885 From: yanvrno@frontier.com Date: 1/20/2015
Subject: Re: How to control Dual Spindles Speeds?
Last thing to do is get an actual readout of the spindle speed of the second spindle.

How do I display the actual speed? The S word shows the main spindle fine, but not sure how to show the second spindle RPM. Do I compute using the Index pulse and then fill a persistent variable?

As a side note, here is a real short video of the two spindles in positioning unison.

Mac.

B_and_C_Axis

 

Group: DynoMotion Message: 10886 From: karmannelectric Date: 1/20/2015
Subject: Re: How to control Dual Spindles Speeds?
Off topic: 'Spiders encounter with CNC'... I just watched this video, and
wanted to comment, but comments were turned off....

'Now I've seen it all'.....

- Steve

> Last thing to do is get an actual readout of the spindle speed of the
> second spindle.
>
> How do I display the actual speed? The S word shows the main spindle fine,
> but not sure how to show the second spindle RPM. Do I compute using the
> Index pulse and then fill a persistent variable?
>
> As a side note, here is a real short video of the two spindles in
> positioning unison.
>
> Mac.
>
> B_and_C_Axis http://youtu.be/n_lPWpkwql4
>
> http://youtu.be/n_lPWpkwql4
>
> B_and_C_Axis http://youtu.be/n_lPWpkwql4 Kflop Kanalog
>
>
>
> View on youtu.be http://youtu.be/n_lPWpkwql4
> Preview by Yahoo
>
>
>
>